package com.example.springboot.mapper;

import com.example.springboot.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DepartmentMapper {
    @Select("SELECT * FROM department")   // 院系
    List<Department> findAll();

//  根据院系代号返回院系名称
    @Select("select department_name from department where  department_id = #{department_id}")
    String findDepartement_name(Integer department_id);
    @Select("select department_name from department")
    List<String> findAllName();
}
